#include <stdio.h>

int main()
{
    #if 0
    int  count = 5;

    /*循环一定要有退出条件*/
    while(1)
    {
        printf("hello word\n");
        count--;
        for(count == 0)
        {
            break; //跳出当前循环
        }
    }
    #endif



#if 0
    int count = 3;
    count++;  //后置++
    printf("count:%d\n",count);

    ++count;   //前置++
    printf("count:%d\n",count);
    
    while(count--)
    {
        printf("hello word\n");
    }
#endif


  #if 1
    /* 前置--: 先运算再判断 */
    int count = 3;

    while (--count)
    {
        printf("hello world\n");
    }
#endif

#if 1
    /* 后置--: 先判断再运算 */
    int count1 = 3;

    while (count1--)
    {
        printf("hello world\n");
    }
#endif

    return 0;

}